local BaseWnd = require(SCRIPTS_DIR .. ".wnds.BaseWnd");
local BattleWnd = class("BattleWnd",BaseWnd);
function BattleWnd:ctor()
	BattleWnd.super.ctor(self);
    
end

function BattleWnd:onOpen()
	--mgrs.data:getBattleData():sendPlayCard()
    self:setTableInfo()
	self:setMyInfo()
	self:setOtherInfo()
end

function BattleWnd:setTableInfo()
	local tableIdText = self:widget("left.tableIdStr")
	tableIdText:setString(mgrs.data:getPlayerData():getTableStrId())
end

function BattleWnd:setMyInfo()
	local uid = self:widget("middle.uid1")
	uid:setString(mgrs.data:getPlayerData():getUid())
	local nickName = self:widget("middle.nickname1")
	nickName:setString(mgrs.data:getPlayerData():getNickName())
end

function BattleWnd:setOtherInfo()
	local others = mgrs.data:getBattleData():getOtherUsers()
	for i,v in ipairs(others) do
		local uid = v:getUid()
		local nickname = v:getNickName()
		local seat = v:getSeat()
		
	end
end

function BattleWnd:newUserEnter()

end

function BattleWnd:onClose()
    
end



function BattleWnd:reqData(handler)
	handler(true);	
end



function BattleWnd:getLayer()
	return enums.Layer.Window;
end

function BattleWnd:getPreloadResList()
	return {};
end

function BattleWnd:getExclusiveType()
	return 0;
end

function BattleWnd:isOpenCloseSoundEnabled()
	return false;
end

function BattleWnd:onEnter()
	mgrs.log:printFuncCall();
end
function BattleWnd:onExit()
	mgrs.log:printFuncCall();
end
function BattleWnd:onEnterTransitionFinish()
	mgrs.log:printFuncCall();
end

function BattleWnd:onExitTransitionStart()
	mgrs.log:printFuncCall();
end


mgrs.wnd:registerWnd(enums.Wnd.Battle,BattleWnd);

--endregion
